Integrand size = 38, antiderivative size = 114 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx=\frac {\cos (e+f x) (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-3-m}}{a c f (5+2 m)}+\frac {\cos (e+f x) (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-2-m}}{a c^2 f \left (15+16 m+4 m^2\right )} \]
cos(f*x+e)*(a+a*sin(f*x+e))^(1+m)*(c-c*sin(f*x+e))^(-3-m)/a/c/f/(5+2*m)+co s(f*x+e)*(a+a*sin(f*x+e))^(1+m)*(c-c*sin(f*x+e))^(-2-m)/a/c^2/f/(4*m^2+16* m+15)
Time = 5.19 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.69 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx=\frac {\cos ^3(e+f x) (4+2 m-\sin (e+f x)) (a (1+\sin (e+f x)))^m (c-c \sin (e+f x))^{-m}}{c^4 f (3+2 m) (5+2 m) (-1+\sin (e+f x))^4} \]
(Cos[e + f*x]^3*(4 + 2*m - Sin[e + f*x])*(a*(1 + Sin[e + f*x]))^m)/(c^4*f* (3 + 2*m)*(5 + 2*m)*(-1 + Sin[e + f*x])^4*(c - c*Sin[e + f*x])^m)
Time = 0.64 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3320, 3042, 3222, 3042, 3221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^2(e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{-m-4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (e+f x)^2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{-m-4}dx\) |
\(\Big \downarrow \) 3320 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^{m+1} (c-c \sin (e+f x))^{-m-3}dx}{a c}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^{m+1} (c-c \sin (e+f x))^{-m-3}dx}{a c}\) |
\(\Big \downarrow \) 3222 |
\(\displaystyle \frac {\frac {\int (\sin (e+f x) a+a)^{m+1} (c-c \sin (e+f x))^{-m-2}dx}{c (2 m+5)}+\frac {\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-3}}{f (2 m+5)}}{a c}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int (\sin (e+f x) a+a)^{m+1} (c-c \sin (e+f x))^{-m-2}dx}{c (2 m+5)}+\frac {\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-3}}{f (2 m+5)}}{a c}\) |
\(\Big \downarrow \) 3221 |
\(\displaystyle \frac {\frac {\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-3}}{f (2 m+5)}+\frac {\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-2}}{c f (2 m+3) (2 m+5)}}{a c}\) |
((Cos[e + f*x]*(a + a*Sin[e + f*x])^(1 + m)*(c - c*Sin[e + f*x])^(-3 - m)) /(f*(5 + 2*m)) + (Cos[e + f*x]*(a + a*Sin[e + f*x])^(1 + m)*(c - c*Sin[e + f*x])^(-2 - m))/(c*f*(3 + 2*m)*(5 + 2*m)))/(a*c)
3.1.82.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + ( f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*( (c + d*Sin[e + f*x])^n/(a*f*(2*m + 1))), x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && EqQ[m + n + 1, 0] && Ne Q[m, -2^(-1)]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + ( f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*( (c + d*Sin[e + f*x])^n/(a*f*(2*m + 1))), x] + Simp[(m + n + 1)/(a*(2*m + 1) ) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n, x], x] /; Free Q[{a, b, c, d, e, f, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && ILtQ[Simplify[m + n + 1], 0] && NeQ[m, -2^(-1)] && (SumSimplerQ[m, 1] || !SumSimplerQ[n, 1])
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(a^(p/ 2)*c^(p/2)) Int[(a + b*Sin[e + f*x])^(m + p/2)*(c + d*Sin[e + f*x])^(n + p/2), x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[p/2]
\[\int \left (\cos ^{2}\left (f x +e \right )\right ) \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{-4-m}d x\]
Time = 0.28 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.67 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx=\frac {{\left (2 \, {\left (m + 2\right )} \cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4}}{4 \, f m^{2} + 16 \, f m + 15 \, f} \]
(2*(m + 2)*cos(f*x + e)^3 - cos(f*x + e)^3*sin(f*x + e))*(a*sin(f*x + e) + a)^m*(-c*sin(f*x + e) + c)^(-m - 4)/(4*f*m^2 + 16*f*m + 15*f)
\[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx=\int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (- c \left (\sin {\left (e + f x \right )} - 1\right )\right )^{- m - 4} \cos ^{2}{\left (e + f x \right )}\, dx \]
\[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4} \cos \left (f x + e\right )^{2} \,d x } \]
\[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4} \cos \left (f x + e\right )^{2} \,d x } \]
Time = 11.74 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.55 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx=-\frac {{\left (a\,\left (\sin \left (e+f\,x\right )+1\right )\right )}^m\,\left (2\,\sin \left (2\,e+2\,f\,x\right )+\sin \left (4\,e+4\,f\,x\right )+48\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+16\,{\sin \left (\frac {3\,e}{2}+\frac {3\,f\,x}{2}\right )}^2+12\,m\,\left (2\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )+4\,m\,\left (2\,{\sin \left (\frac {3\,e}{2}+\frac {3\,f\,x}{2}\right )}^2-1\right )-32\right )}{c^4\,f\,{\left (-c\,\left (\sin \left (e+f\,x\right )-1\right )\right )}^m\,\left (4\,m^2+16\,m+15\right )\,\left (56\,{\sin \left (e+f\,x\right )}^2-56\,\sin \left (e+f\,x\right )-2\,{\sin \left (2\,e+2\,f\,x\right )}^2+8\,\sin \left (3\,e+3\,f\,x\right )+8\right )} \]
-((a*(sin(e + f*x) + 1))^m*(2*sin(2*e + 2*f*x) + sin(4*e + 4*f*x) + 48*sin (e/2 + (f*x)/2)^2 + 16*sin((3*e)/2 + (3*f*x)/2)^2 + 12*m*(2*sin(e/2 + (f*x )/2)^2 - 1) + 4*m*(2*sin((3*e)/2 + (3*f*x)/2)^2 - 1) - 32))/(c^4*f*(-c*(si n(e + f*x) - 1))^m*(16*m + 4*m^2 + 15)*(8*sin(3*e + 3*f*x) - 56*sin(e + f* x) - 2*sin(2*e + 2*f*x)^2 + 56*sin(e + f*x)^2 + 8))